<?php
namespace app\middleware;

use think\Request;

class Auth
{
    public function handle(Request $request, \Closure $next)
    {
        if (!$request->header('x-wx-openid')) {
            return json(['code' => 401, 'msg' => '未授权访问'], 401);
        }
        return $next($request);
    }
}
